import request from '@/utils/request';

//获取指定周的选课表
export const getSchedule = (data) => {
  return request({
    method: 'POST',
    url: '/admin/expschedule/schedule/auth/getSchedule',
    data
  })
}

//根据id获取课程信息
export const getCourseById = (id) => {
  return request({
    method: 'GET',
    url: `/admin/expschedule/schedule/auth/getById/${id}`
  })
}

//新增课程
export const addCourse = (data) => {
  return request({
    method: 'POST',
    url: '/admin/expschedule/schedule/auth/save',
    data
  })
}

//修改课程
export const editCourse = (data) => {
  return request({
    method: 'PUT',
    url: '/admin/expschedule/schedule/auth/update',
    data
  })
}

//删除课程
export const deleteCourse = (id) => {
  return request({
    method: 'DELETE',
    url: `/admin/expschedule/schedule/auth/remove/${id}`,
  })
}